package com.region.integral.util;

import java.io.IOException;
import java.util.Properties;

public class RegulationUtil {
	private static Properties properties = null;
	static {
		properties = new Properties();
		load();
	}
	public RegulationUtil() {
		properties = new Properties();
		load();
	}

	private static void load() {
		try {
			properties.load(RegulationUtil.class.getResourceAsStream("/comom_user_integral_rule.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	private static void reload(){
		try {
			properties.load(RegulationUtil.class.getResourceAsStream("/comom_user_integral_rule.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public static String getRuleIntegral(String key){
		if(properties == null){
			reload();
		}
		return properties.getProperty(key);
	}
}
